#pragma once
#include "ISomeContainterIterator.h"
class IObject;

class CSomeContainer
{
public:
    CSomeContainer();
    ~CSomeContainer();

    bool Register(int objectId, boost::shared_ptr<IObject> object);
    bool Unregister(int objectId);
    boost::shared_ptr<IObject> Query(int objectId);

    std::auto_ptr<ISomeContainterIterator> CreateIterator();

private:
    friend class CSomeContainterIterator;
    typedef std::map<int, boost::shared_ptr<IObject>> Objects_mt;
    Objects_mt m_map;
    boost::mutex m_lock;
};
